<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <meta name="format-detection" content="telephone=no">
        
        <title>发优惠券详情</title>
        
        <link rel="stylesheet" href="css/detail.css?t=201611301751" />
    </head>
    <body id="coupon" v-cloak>
		<!--发优惠券详情-->
		<div class="coupon-box">
			<div class="title">
				<div class="name"><span class="sprites i-shop-icon"></span>{{activityName}}</div>
			</div>
			<div class="line-bg"></div>
			<div class="content">
				<div class="info">
					<p class="price">&yen;<span>{{parseInt(couponValue)}}</span></p>
					<p class="tips">{{couponRule}}</p>
				</div>
				<div class="explain">
					<h3>券类型</h3>
					<p>{{couponTypeTxt}}</p>
					<h3>使用说明</h3>
					<p><span>{{useGuide}}</span></p>
					<h3>用券规则</h3>
					<p>{{couponRule}}</p>
					<h3>用券范围</h3>
					<p>{{productsTxt}}</p>
					<h3>适用门店</h3>
					<p>{{storesTxt}}</p>
				</div>
				<a href="javascript:;" class="item" @click="viewGoods">查看此券可用商品<span class="sprites i-common-arrow"></span></a>
			</div>
		</div>
		
		<script src="js/zepto.min.js" type="text/javascript"></script>
		<script src="js/vue.min.js" type="text/javascript"></script>
		<script src="js/vue-resource.min.js" type="text/javascript"></script>
		<script src="js/common.js?t=201611301751" type="text/javascript"></script>
		<script type="text/javascript">
			var vm = new Vue({
                el: '#coupon',
                data: {
                	activityName:"",
	                couponRule:"",
	                couponTypeTxt:"",
	                couponValue:"",
	                productsTxt:"",
	                storesTxt:"",
	                useGuide:"",
	                activityId:"",
	                cityCode: "",
	                mdmCityCode: "",
	                couponRuleId: "",
	                
                    err: false,
                    errCtt: ""
                },
                computed: {
                    
                },
                methods: {
                	couponDetail: function(){
                    	var urlArgs = Shop.getUrlArgs();
						this.couponRuleId = urlArgs.couponRuleId;
						this.activityName = urlArgs.activityName;
	                	this.couponRule = urlArgs.couponRule;
	                	this.couponTypeTxt = urlArgs.couponTypeTxt;
	                	this.couponValue = urlArgs.couponValue;
	                	this.productsTxt = urlArgs.productsTxt;
	                	this.storesTxt = urlArgs.storesTxt;
	                	this.useGuide = urlArgs.useGuide;
	                	
	                	this.cityCode = urlArgs.cityCode;
	                	this.mdmCityCode = urlArgs.mdmCityCode;
                   	},
                   	viewGoods: function(){
                    	location.href = "view_goods.html?couponRuleId=" + this.couponRuleId + "&cityCode=" + this.cityCode + "&mdmCityCode=" + this.mdmCityCode + "&couponRule=" + this.couponRule + "&couponValue=" +this.couponValue;
                   	},
                },
                ready: function(){
                	this.couponDetail();
                }
            });
		</script>
    </body>
</html>